package cn.cvs.service.impl;

import cn.cvs.dao.SysRoleMapper;
import cn.cvs.pojo.SysRole;
import cn.cvs.service.SysRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("sysRoleService")
public class SysRoleServiceImpl implements SysRoleService {
    @Resource
    private SysRoleMapper sysRoleMapper;


    @Override
    public int addRole(SysRole role) {
        return sysRoleMapper.addRole(role);
    }

    @Override
    public int delRole(Integer id) {
        return sysRoleMapper.delRole(id);
    }

    @Override
    public List<SysRole> getRoleByName(String a) {
        return sysRoleMapper.getRoleByName(a);
    }

    @Override
    public List<SysRole> getRoleList() {
        return sysRoleMapper.getRoleList();
    }

    @Override
    public List<SysRole> getSysRoleByCode(String code) {
        return sysRoleMapper.getSysRoleByCode(code);
    }

    @Override
    public SysRole getRoleById(Integer id) {
        return sysRoleMapper.getRoleById(id);
    }

    @Override
    public int updateRoleBySet(SysRole s) {
        return sysRoleMapper.updateRoleBySet(s);
    }

}
